/ BBS in a Box 12
/ BBS in a box XII-1.iso / Files / Tele / C / Comet2.1.3.sit / emlib / macinit.c ![]() | < prev | next > |
MacBinary | 1991-06-25 | 2.6 KB | [TEXT/????] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
66% | dexvert | Compact Compressed (Unix) (archive/compact) | ext | Supported |
10% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary II, Tue Jun 25 14:59:09 1991, modified Tue Jun 25 14:59:09 1991, creator '????', type ASCII, 2128 bytes "macinit.c" , at 0x8d0 382 bytes resource | default (weak) | |
99% | file | data | default | |
74% | TrID | Macintosh plain text (MacBinary) | default | |
25% | TrID | MacBinary 2 | default (weak) | |
100% | siegfried | fmt/1762 MacBinary (II) | default | |
100% | lsar | MacBinary | default |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [????] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 09 6d 61 63 69 6e 69 | 74 2e 63 00 00 00 00 00 |..macini|t.c.....|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 3f 3f 3f | 3f 00 00 00 00 00 00 00 |.TEXT???|?.......|
|00000050| 00 00 00 00 00 08 50 00 | 00 01 7e a4 8d 42 fd a4 |......P.|..~..B..|
|00000060| 8d 42 fd 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.B......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 8c ff 00 00 |........|........|
|00000080| 2f 2a 0d 09 43 6f 70 79 | 72 69 67 68 74 20 43 6f |/*..Copy|right Co|
|00000090| 72 6e 65 6c 6c 20 55 6e | 69 76 65 72 73 69 74 79 |rnell Un|iversity|
|000000a0| 20 31 39 38 36 2e 20 20 | 41 6c 6c 20 72 69 67 68 | 1986. |All righ|
|000000b0| 74 73 20 61 72 65 20 72 | 65 73 65 72 76 65 64 2e |ts are r|eserved.|
|000000c0| 0d 0d 09 41 73 20 6f 66 | 20 34 2f 31 30 2f 38 36 |...As of| 4/10/86|
|000000d0| 3a 0d 09 54 68 69 73 20 | 73 6f 75 72 63 65 20 66 |:..This |source f|
|000000e0| 69 6c 65 20 6d 61 79 20 | 68 61 76 65 20 6e 6f 20 |ile may |have no |
|000000f0| 63 68 61 6e 67 65 73 20 | 66 72 6f 6d 20 74 68 65 |changes |from the|
|00000100| 20 4d 2e 49 2e 54 20 6f | 72 69 67 69 6e 61 6c 0d | M.I.T o|riginal.|
|00000110| 09 6f 74 68 65 72 20 74 | 68 61 6e 20 74 68 69 73 |.other t|han this|
|00000120| 20 6e 6f 74 69 63 65 3b | 20 62 75 74 20 69 74 20 | notice;| but it |
|00000130| 68 61 73 20 62 65 65 6e | 20 74 65 73 74 65 64 20 |has been| tested |
|00000140| 61 73 20 70 61 72 74 20 | 6f 66 20 0d 09 43 6f 72 |as part |of ..Cor|
|00000150| 6e 65 6c 6c 27 73 20 41 | 7a 74 65 63 2d 43 20 70 |nell's A|ztec-C p|
|00000160| 6f 72 74 2e 20 20 53 65 | 65 20 6e 6f 74 69 63 65 |ort. Se|e notice|
|00000170| 2e 68 0d 2a 2f 0d 0d 2f | 2a 09 6d 61 63 69 6e 69 |.h.*/../|*.macini|
|00000180| 74 2e 63 20 69 6e 69 74 | 69 61 6c 69 7a 65 73 20 |t.c init|ializes |
|00000190| 74 68 65 20 6d 6f 73 74 | 20 67 65 6e 65 72 61 6c |the most| general|
|000001a0| 20 6d 61 63 20 69 6e 74 | 65 72 66 61 63 65 73 20 | mac int|erfaces |
|000001b0| 2a 2f 0d 0d 23 69 6e 63 | 6c 75 64 65 09 3c 65 6d |*/..#inc|lude.<em|
|000001c0| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 09 3c 69 6e |.h>.#inc|lude.<in|
|000001d0| 69 74 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 09 |its.h>.#|include.|
|000001e0| 3c 6d 65 6d 6f 72 79 2e | 68 3e 0d 0d 23 69 6e 63 |<memory.|h>..#inc|
|000001f0| 6c 75 64 65 09 3c 68 31 | 39 2e 68 3e 0d 23 69 6e |lude.<h1|9.h>.#in|
|00000200| 63 6c 75 64 65 09 3c 6d | 61 63 64 65 66 73 2e 68 |clude.<m|acdefs.h|
|00000210| 3e 0d 0d 23 64 65 66 69 | 6e 65 20 4e 55 4d 4d 41 |>..#defi|ne NUMMA|
|00000220| 53 54 45 52 53 09 31 30 | 0d 0d 0d 2f 2a 20 0d 20 |STERS.10|.../* . |
|00000230| 2a 20 20 49 6e 69 74 69 | 61 6c 69 7a 65 20 6d 61 |* Initi|alize ma|
|00000240| 63 69 6e 74 6f 73 68 20 | 66 75 6e 64 61 6d 65 6e |cintosh |fundamen|
|00000250| 74 61 6c 73 3a 20 20 6d | 65 6d 6f 72 79 2c 20 73 |tals: m|emory, s|
|00000260| 63 72 65 65 6e 0d 20 2a | 2f 0d 0d 0d 6d 61 63 69 |creen. *|/...maci|
|00000270| 6e 69 74 28 61 6c 6c 6f | 63 73 69 7a 65 29 0d 20 |nit(allo|csize). |
|00000280| 20 20 6c 6f 6e 67 20 61 | 6c 6c 6f 63 73 69 7a 65 | long a|llocsize|
|00000290| 3b 0d 7b 0d 09 63 68 61 | 72 09 09 2a 62 70 74 72 |;.{..cha|r..*bptr|
|000002a0| 3b 0d 09 69 6e 74 20 63 | 6f 75 6e 74 3b 0d 09 0d |;..int c|ount;...|
|000002b0| 23 69 66 64 65 66 20 4e | 4f 53 43 52 44 4d 50 0d |#ifdef N|OSCRDMP.|
|000002c0| 2f 2a 20 76 61 72 69 61 | 62 6c 65 20 61 64 64 72 |/* varia|ble addr|
|000002d0| 65 73 73 20 66 6f 72 20 | 64 69 73 61 62 6c 69 6e |ess for |disablin|
|000002e0| 67 20 73 79 73 74 65 6d | 20 74 72 61 70 20 6f 66 |g system| trap of|
|000002f0| 20 74 6f 70 20 72 6f 77 | 20 63 6f 6d 6d 61 6e 64 | top row| command|
|00000300| 2d 73 68 69 66 74 20 6b | 65 79 73 20 2a 2f 0d 09 |-shift k|eys */..|
|00000310| 63 68 61 72 20 2a 20 53 | 63 72 44 6d 70 45 6e 62 |char * S|crDmpEnb|
|00000320| 20 3d 20 30 78 32 66 38 | 3b 0d 0d 09 2a 53 63 72 | = 0x2f8|;...*Scr|
|00000330| 44 6d 70 45 6e 62 20 3d | 20 30 3b 09 09 0d 09 09 |DmpEnb =| 0;.....|
|00000340| 2f 2a 20 64 69 73 61 62 | 6c 65 73 20 63 6f 6d 6d |/* disab|les comm|
|00000350| 61 6e 64 2d 73 68 69 66 | 74 2d 6e 75 6d 62 65 72 |and-shif|t-number|
|00000360| 20 74 72 61 70 3b 20 74 | 68 69 73 20 6d 65 61 6e | trap; t|his mean|
|00000370| 73 20 74 68 65 20 65 76 | 65 6e 74 20 6d 67 72 20 |s the ev|ent mgr |
|00000380| 0d 09 09 20 2a 20 77 69 | 6c 6c 20 6e 6f 20 6c 6f |... * wi|ll no lo|
|00000390| 6e 67 65 72 20 64 6f 20 | 73 63 72 65 65 6e 20 64 |nger do |screen d|
|000003a0| 75 6d 70 73 20 0d 09 09 | 20 2a 2f 0d 23 65 6e 64 |umps ...| */.#end|
|000003b0| 69 66 0d 0d 09 62 70 74 | 72 20 3d 20 28 63 68 61 |if...bpt|r = (cha|
|000003c0| 72 20 2a 29 20 4e 65 77 | 50 74 72 28 61 6c 6c 6f |r *) New|Ptr(allo|
|000003d0| 63 73 69 7a 65 29 3b 0d | 09 69 66 20 28 62 70 74 |csize);.|.if (bpt|
|000003e0| 72 20 3d 3d 20 28 63 68 | 61 72 20 2a 29 20 4e 55 |r == (ch|ar *) NU|
|000003f0| 4c 4c 29 20 7b 0d 09 20 | 20 20 53 79 73 42 65 65 |LL) {.. | SysBee|
|00000400| 70 28 35 29 3b 0d 09 7d | 0d 09 65 6c 73 65 20 7b |p(5);..}|..else {|
|00000410| 0d 09 20 20 20 44 69 73 | 70 6f 73 50 74 72 28 62 |.. Dis|posPtr(b|
|00000420| 70 74 72 29 3b 0d 09 7d | 0d 0d 09 4d 61 78 41 70 |ptr);..}|...MaxAp|
|00000430| 70 6c 5a 6f 6e 65 28 29 | 3b 20 20 0d 0d 09 66 6f |plZone()|; ...fo|
|00000440| 72 20 28 63 6f 75 6e 74 | 20 3d 20 4e 55 4d 4d 41 |r (count| = NUMMA|
|00000450| 53 54 45 52 53 3b 20 63 | 6f 75 6e 74 2d 2d 3b 20 |STERS; c|ount--; |
|00000460| 29 20 7b 0d 09 09 4d 6f | 72 65 4d 61 73 74 65 72 |) {...Mo|reMaster|
|00000470| 73 28 29 3b 0d 09 7d 0d | 0d 09 49 6e 69 74 47 72 |s();..}.|..InitGr|
|00000480| 61 66 28 26 74 68 65 50 | 6f 72 74 29 3b 0d 09 49 |af(&theP|ort);..I|
|00000490| 6e 69 74 46 6f 6e 74 73 | 28 29 3b 0d 09 49 6e 69 |nitFonts|();..Ini|
|000004a0| 74 57 69 6e 64 6f 77 73 | 28 29 3b 0d 09 49 6e 69 |tWindows|();..Ini|
|000004b0| 74 4d 65 6e 75 73 28 29 | 3b 0d 09 54 45 49 6e 69 |tMenus()|;..TEIni|
|000004c0| 74 28 29 3b 0d 09 49 6e | 69 74 44 69 61 6c 6f 67 |t();..In|itDialog|
|000004d0| 73 28 28 50 72 6f 63 50 | 74 72 29 20 4e 55 4c 4c |s((ProcP|tr) NULL|
|000004e0| 29 3b 0d 09 49 6e 69 74 | 43 75 72 73 6f 72 28 29 |);..Init|Cursor()|
|000004f0| 3b 0d 0d 09 6b 65 79 69 | 6e 69 74 28 29 3b 09 09 |;...keyi|nit();..|
|00000500| 09 2f 2a 20 63 68 61 6e | 67 65 20 74 68 65 20 6b |./* chan|ge the k|
|00000510| 65 79 20 6d 61 70 70 69 | 6e 67 20 66 6f 72 20 65 |ey mappi|ng for e|
|00000520| 20 69 20 6e 20 75 20 2a | 2f 0d 09 0d 09 67 6c 6f | i n u *|/....glo|
|00000530| 62 61 6c 63 6f 6e 66 69 | 67 28 29 3b 0d 0d 23 69 |balconfi|g();..#i|
|00000540| 66 64 65 66 20 53 45 54 | 47 52 4f 57 5a 4f 4e 45 |fdef SET|GROWZONE|
|00000550| 0d 09 2f 2a 20 44 6f 65 | 73 6e 27 74 20 77 6f 72 |../* Doe|sn't wor|
|00000560| 6b 20 75 6e 64 65 72 20 | 4d 46 20 2a 2f 0d 09 2f |k under |MF */../|
|00000570| 2a 20 61 6c 6c 6f 63 61 | 74 65 20 61 20 67 72 6f |* alloca|te a gro|
|00000580| 77 20 62 6c 6f 63 6b 20 | 61 6e 64 20 73 65 74 20 |w block |and set |
|00000590| 6f 75 72 20 67 72 6f 77 | 20 7a 6f 6e 65 20 66 75 |our grow| zone fu|
|000005a0| 6e 63 74 69 6f 6e 20 2a | 2f 0d 09 7b 0d 09 09 65 |nction *|/..{...e|
|000005b0| 78 74 65 72 6e 20 70 61 | 73 63 61 6c 20 6c 6f 6e |xtern pa|scal lon|
|000005c0| 67 20 67 72 6f 77 7a 6f | 6e 65 28 29 3b 0d 09 09 |g growzo|ne();...|
|000005d0| 0d 09 09 67 72 6f 77 62 | 6c 6f 63 6b 20 3d 20 4e |...growb|lock = N|
|000005e0| 65 77 48 61 6e 64 6c 65 | 28 47 52 4f 57 42 4c 4f |ewHandle|(GROWBLO|
|000005f0| 43 4b 53 49 5a 45 29 3b | 0d 09 09 53 65 74 47 72 |CKSIZE);|...SetGr|
|00000600| 6f 77 5a 6f 6e 65 28 67 | 72 6f 77 7a 6f 6e 65 29 |owZone(g|rowzone)|
|00000610| 3b 0d 09 7d 0d 23 65 6e | 64 69 66 0d 7d 0d 0d 0d |;..}.#en|dif.}...|
|00000620| 23 69 66 64 65 66 20 53 | 45 54 47 52 4f 57 5a 4f |#ifdef S|ETGROWZO|
|00000630| 4e 45 0d 0d 23 64 65 66 | 69 6e 65 20 47 52 4f 57 |NE..#def|ine GROW|
|00000640| 42 4c 4f 43 4b 53 49 5a | 45 09 36 30 30 30 09 09 |BLOCKSIZ|E.6000..|
|00000650| 2f 2a 20 6c 65 61 76 65 | 20 73 69 7a 65 20 7a 65 |/* leave| size ze|
|00000660| 72 6f 20 75 6e 6c 65 73 | 73 20 6e 65 65 64 20 64 |ro unles|s need d|
|00000670| 65 6d 6f 6e 73 74 72 61 | 74 65 64 20 2a 2f 0d 0d |emonstra|ted */..|
|00000680| 48 61 6e 64 6c 65 20 67 | 72 6f 77 62 6c 6f 63 6b |Handle g|rowblock|
|00000690| 3b 09 09 09 09 2f 2a 20 | 48 61 6e 64 6c 65 20 74 |;..../* |Handle t|
|000006a0| 6f 20 6d 65 6d 6f 72 79 | 20 74 6f 20 66 72 65 65 |o memory| to free|
|000006b0| 20 75 70 20 2a 2f 0d 0d | 70 61 73 63 61 6c 20 6c | up */..|pascal l|
|000006c0| 6f 6e 67 20 67 72 6f 77 | 7a 6f 6e 65 28 67 72 6f |ong grow|zone(gro|
|000006d0| 77 73 69 7a 65 29 0d 6c | 6f 6e 67 20 67 72 6f 77 |wsize).l|ong grow|
|000006e0| 73 69 7a 65 3b 0d 7b 0d | 09 73 74 61 74 69 63 20 |size;.{.|.static |
|000006f0| 6c 6f 6e 67 20 67 72 6f | 77 6c 65 66 74 20 3d 20 |long gro|wleft = |
|00000700| 47 52 4f 57 42 4c 4f 43 | 4b 53 49 5a 45 3b 0d 09 |GROWBLOC|KSIZE;..|
|00000710| 0d 09 69 66 20 28 2a 47 | 5a 52 6f 6f 74 48 6e 64 |..if (*G|ZRootHnd|
|00000720| 20 21 3d 20 4e 55 4c 4c | 29 20 7b 0d 09 09 48 4c | != NULL|) {...HL|
|00000730| 6f 63 6b 28 47 5a 52 6f | 6f 74 48 6e 64 29 3b 0d |ock(GZRo|otHnd);.|
|00000740| 09 7d 0d 09 69 66 20 28 | 67 72 6f 77 6c 65 66 74 |.}..if (|growleft|
|00000750| 20 3c 20 67 72 6f 77 73 | 69 7a 65 29 20 7b 0d 09 | < grows|ize) {..|
|00000760| 09 67 72 6f 77 73 69 7a | 65 20 3d 20 67 72 6f 77 |.growsiz|e = grow|
|00000770| 6c 65 66 74 3b 0d 09 09 | 69 66 20 28 67 72 6f 77 |left;...|if (grow|
|00000780| 6c 65 66 74 29 0d 09 09 | 09 44 69 73 70 6f 73 48 |left)...|.DisposH|
|00000790| 61 6e 64 6c 65 28 67 72 | 6f 77 62 6c 6f 63 6b 29 |andle(gr|owblock)|
|000007a0| 3b 0d 09 09 67 72 6f 77 | 6c 65 66 74 20 3d 20 30 |;...grow|left = 0|
|000007b0| 3b 0d 09 7d 0d 09 65 6c | 73 65 20 7b 0d 09 09 67 |;..}..el|se {...g|
|000007c0| 72 6f 77 6c 65 66 74 20 | 2d 3d 20 67 72 6f 77 73 |rowleft |-= grows|
|000007d0| 69 7a 65 3b 0d 09 09 53 | 65 74 48 61 6e 64 6c 65 |ize;...S|etHandle|
|000007e0| 53 69 7a 65 28 67 72 6f | 77 62 6c 6f 63 6b 2c 20 |Size(gro|wblock, |
|000007f0| 67 72 6f 77 6c 65 66 74 | 29 3b 0d 09 7d 0d 09 69 |growleft|);..}..i|
|00000800| 66 20 28 2a 47 5a 52 6f | 6f 74 48 6e 64 20 21 3d |f (*GZRo|otHnd !=|
|00000810| 20 4e 55 4c 4c 29 20 7b | 0d 09 09 48 55 6e 6c 6f | NULL) {|...HUnlo|
|00000820| 63 6b 28 47 5a 52 6f 6f | 74 48 6e 64 29 3b 0d 09 |ck(GZRoo|tHnd);..|
|00000830| 7d 0d 09 69 66 20 28 67 | 72 6f 77 6c 65 66 74 20 |}..if (g|rowleft |
|00000840| 3c 20 35 30 30 30 29 20 | 7b 0d 09 09 70 72 32 35 |< 5000) |{...pr25|
|00000850| 28 30 2c 20 22 59 6f 75 | 27 72 65 20 56 45 52 59 |(0, "You|'re VERY|
|00000860| 20 73 68 6f 72 74 20 6f | 66 20 6d 65 6d 6f 72 79 | short o|f memory|
|00000870| 21 22 29 3b 0d 09 7d 0d | 09 65 6c 73 65 20 7b 0d |!");..}.|.else {.|
|00000880| 09 09 70 72 65 72 72 32 | 35 28 22 59 6f 75 27 72 |..prerr2|5("You'r|
|00000890| 65 20 72 75 6e 6e 69 6e | 67 20 73 68 6f 72 74 20 |e runnin|g short |
|000008a0| 6f 66 20 6d 65 6d 6f 72 | 79 21 22 29 3b 0d 09 7d |of memor|y!");..}|
|000008b0| 0d 09 72 65 74 75 72 6e | 28 67 72 6f 77 73 69 7a |..return|(growsiz|
|000008c0| 65 29 3b 0d 7d 0d 0d 0d | 0d 23 65 6e 64 69 66 0d |e);.}...|.#endif.|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000910| 43 6f 6c 6f 72 73 20 20 | 20 20 20 31 32 37 09 09 |Colors | 127..|
|00000920| 09 09 2f 2a 20 72 65 73 | 6f 75 72 63 65 20 49 44 |../* res|ource ID|
|00000930| 09 6d 61 63 69 6e 69 74 | 2e 63 02 00 00 00 50 61 |.macinit|.c....Pa|
|00000940| 72 74 53 49 54 78 00 00 | 00 00 00 00 00 00 00 01 |rtSITx..|........|
|00000950| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 a9 8d 3a 7d 00 00 | 00 00 00 00 01 7e 64 3b |....:}..|.....~d;|
|00000980| 09 09 09 09 2f 2a 20 6d | 61 67 6e 69 74 75 64 65 |..../* m|agnitude|
|00000990| 20 6f 66 20 72 65 64 20 | 63 6f 6d 70 6f 6e 65 6e | of red |componen|
|000009a0| 74 20 2a 2f 0d 09 75 6e | 73 69 67 6e 65 64 20 73 |t */..un|signed s|
|000009b0| 68 6f 72 74 09 67 72 65 | 65 6e 3b 09 09 09 09 2f |hort.gre|en;..../|
|000009c0| 2a 20 6d 61 67 6e 69 74 | 75 64 65 20 6f 66 20 67 |* magnit|ude of g|
|000009d0| 72 65 65 6e 20 63 6f 6d | 70 6f 6e 65 6e 74 20 2a |reen com|ponent *|
|000009e0| 2f 0d 09 75 6e 73 69 67 | 6e 65 64 20 73 68 6f 72 |/..unsig|ned shor|
|000009f0| 74 09 62 6c 75 65 3b 09 | 09 09 09 2f 2a 20 6d 61 |t.blue;.|.../* ma|
|00000a00| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a20| 00 00 00 00 00 00 00 06 | 00 04 00 27 00 00 01 e1 |........|...'....|
|00000a30| 02 00 00 27 00 00 01 e1 | 02 00 a4 8c fc ad 00 00 |...'....|........|
|00000a40| 04 74 00 00 04 7b 00 00 | 03 f9 01 00 00 00 01 00 |.t...{..|........|
|00000a50| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 17 1f 34 |...L...L|...2...4|
|00000a60| 05 84 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00000a70| 00 0a 03 ed ff ff 00 00 | 00 00 00 18 57 18 00 00 |........|....W...|
+--------+-------------------------+-------------------------+--------+--------+